<{include file="admin/admin_head.html"}>
<link rel="stylesheet" href="<{$smarty.const.__URL__}>plugins/ueditor/themes/default/ueditor.css"/>
<script type="text/javascript">
	URL = "<{$smarty.const.__URL__}>plugins/ueditor/";
</script>
<body>
	<{include file="admin/admin_nav.html"}>
	<h1>编辑文章</h1>
	<form action="article.php" method="post">
		<p><label for="title">标题：</label><input type="text" name="title" value="<{$list.title}>" /></p>
		<p>
			<label for="category">分类：</label>
			<select name="category">
				<{foreach from=$cats item=cat}>				
				<option value="<{$cat.id}>" <{if $list.category eq $cat.id }> selected="selected"<{/if}>><{$cat.name}></option>
				<{/foreach}>
			</select>
		</p>
		<p><label for="category">内容：</label></p>
		<p><label for="category">&nbsp;&nbsp;&nbsp;&nbsp;</label>
			<textarea name="content" id="content"><{$list.content}></textarea>
		</p>
		<p>
			<input type="submit" name="submit" value="提交" />
			<input type="button" value="返回列表" onclick="location.href='article.php?action=articles'" />
			<input type="hidden" name="action" value="editArticle">
		</p>
	</form>
	<script type="text/javascript" src="<{$smarty.const.__URL__}>plugins/ueditor/editor_config.js"></script>
	<script type="text/javascript" src="<{$smarty.const.__URL__}>plugins/ueditor/editor_all_min.js"></script>	
<script type="text/javascript">
	var editor = new baidu.editor.ui.Editor();
	editor.render("content");
</script>
</body>
</html>

